<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<script>
		let time2=setInterval(function(){
			console.log(222);
		})
		console.log(time2);  //1
		clearInterval(time2)
		// clearInterval(1)

		let time1=setTimeout(function(){
			console.log(111);
		})
		console.log(time1);   //2
		clearTimeout(time1)
		// clearInterval(2)


		
		let time4=setInterval(function(){
			console.log(222);
		})
		console.log(time4);  //3
		clearInterval(time4)
		// clearInterval(3)


		let time3=setTimeout(function(){
			console.log(111);
		})
		console.log(time3);   //4
		clearTimeout(time3)
		// clearInterval(4)


		// 清除定时器的参数是定时器在页面上的前后顺序,不受变量名顺序影响
	</script>
</body>
</html>